package com.xing.binbackend.pattern.strategy33.operation.performance;

import com.xing.binbackend.topology.model.Edge;
import com.xing.binbackend.topology.model.Vertex;
import org.springframework.util.CollectionUtils;

import java.util.List;

// 普通用户处理策略
public class PServerCollector implements CollectorStrategy {

    private final List<String> resIds;

    public PServerCollector(List<String> resIds) {
        this.resIds = resIds;
    }

    @Override
    public void process(List<Vertex> vertices, List<Edge> edges) {
        if (CollectionUtils.isEmpty(resIds)) {
            return;
        }
        System.out.println("普通用户的请求正在处理：");
        resIds.clear();
    }
}
